-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: exclude clutter from the component API #167
Conversation
React devs are used to using the aria-label from React.HTMLAttributes anyway
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #167 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 25 25
Lines 168 168
Branches 16 16
=======================================
Hits 165 165
Misses 1 1
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Confirmed that this makes JSDoc work in VSCode.
Confirmed that this PR also fixes #150 |
Description
Omit unnecessary parts of
HTMLElement
interface from all Vaadin React components. This will eliminate clutter from the component public API including properties such asparentElement
,offsetHeight
, andappendChild
.Before:
![Screenshot 2023-12-08 at 12 19 57](https://private-user-images.githubusercontent.com/1222264/289039195-d843292e-d5c8-422b-bd85-381bf07ec8ff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMjk3NzQsIm5iZiI6MTczOTAyOTQ3NCwicGF0aCI6Ii8xMjIyMjY0LzI4OTAzOTE5NS1kODQzMjkyZS1kNWM4LTQyMmItYmQ4NS0zODFiZjA3ZWM4ZmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTU0NDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWJjNmZmZjM3ZWQyZTNlMWI2ZTdmNTZjNWQ2YjJkNmE4MDI4N2YyMjk4OTRmMGM0ZjljZmVhMDMwNjAwZjliNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.qZ6MS2sEZrBTwKz-pXFVvJIom0lo3bOuWFxH6205lZU)
After:
![Screenshot 2023-12-08 at 12 20 47](https://private-user-images.githubusercontent.com/1222264/289039180-3ccefd88-36bd-4ce6-a00c-ccc4ca3c072e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMjk3NzQsIm5iZiI6MTczOTAyOTQ3NCwicGF0aCI6Ii8xMjIyMjY0LzI4OTAzOTE4MC0zY2NlZmQ4OC0zNmJkLTRjZTYtYTAwYy1jY2M0Y2EzYzA3MmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTU0NDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTgxOTVkMWUwODlmNmNlNGFlODI1NjM4MjUxMWEwMWUzYzg3Mjk5ZGQ1ZjZhOWRmY2E5ZGVkMjQ0MmRlMzcwNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VcRE4IA3eCAiVkrxmlzg-Ow3h_kXpGgoF8d1Gi7M-Ok)
Also,
ControllerMixinClass
properties (addController
andremoveController
) are manually excluded.Part of #161
Fixes #137
Fixes #150
Fixes #165
Type of change
Refactor